{% extends 'base_header.html' %}

{# 导入本html专属的js #}
{% block head %}
    <script type="text/javascript" src="/static/js/jquery-ui.min.js"></script>
    <script type="text/javascript" src="/static/js/slide.js"></script>
	{% endblock %}

{% block cart %}
	<div class="search_bar clearfix">
		<a href="/goods/index/" class="logo fl"><img src="/static/images/logo.png"></a>
        <form action="/search/" method="get">
            <div class="search_con fl">
			<input type="text" class="input_text fl" name="q" placeholder="搜索商品">
			<input type="submit" class="input_btn fr" name="" value="搜索">
		    </div>
        </form>
{#        购物车的展示框div#}
        <div class="guest_cart fr">
            <a href="/cart/" class="cart_name fl">我的购物车</a>
            <div class="goods_count fl" id="show_count">{{ cart_count }}</div>
        </div>
    </div>
{% endblock %}

{% block body %}
    <div class="navbar_con">
		<div class="navbar">
			<h1 class="fl">全部商品分类</h1>
			<ul class="navlist fl">
				<li><a href="/goods/index/">首页</a></li>
				<li class="interval">|</li>
				<li><a href="">手机生鲜</a></li>
				<li class="interval">|</li>
				<li><a href="">抽奖</a></li>
			</ul>
		</div>
	</div>
    <div class="center_con clearfix">
		<ul class="subnav fl">
			<li><a href="#model01" class="fruit">新鲜水果</a></li>
			<li><a href="#model02" class="seafood">海鲜水产</a></li>
			<li><a href="#model03" class="meet">猪牛羊肉</a></li>
			<li><a href="#model04" class="egg">禽类蛋品</a></li>
			<li><a href="#model05" class="vegetables">新鲜蔬菜</a></li>
			<li><a href="#model06" class="ice">速冻食品</a></li>
		</ul>
		<div class="slide fl">
			<ul class="slide_pics">
				<li><a href=""><img src="/static/images/slide.jpg" alt="幻灯片"></a></li>
				<li><img src="/static/images/slide02.jpg" alt="幻灯片"></li>
				<li><img src="/static/images/slide03.jpg" alt="幻灯片"></li>
				<li><img src="/static/images/slide04.jpg" alt="幻灯片"></li>
			</ul>
			<div class="prev"></div>
			<div class="next"></div>
			<ul class="points"></ul>
		</div>
		<div class="adv fl">
			<a href="#"><img src="/static/images/adv01.jpg"></a>
			<a href="#"><img src="/static/images/adv02.jpg"></a>
		</div>
	</div>
    {% for category,goods_list in new_goods_dict.items %}
        <div class="list_model">
		<div class="list_title clearfix">
			<h3 class="fl" id="model0{{ forloop.counter }}">{{ category.category_name }}</h3>
			<div class="subtitle fl">
				<span>|</span>
				<a href="#">鲜芒</a>
				<a href="#">加州提子</a>
				<a href="#">亚马逊牛油果</a>
			</div>
			<a href="/goods/list/{{ category.id }}/default/1/" class="goods_more fr" id="fruit_more">查看更多 &gt;</a>
		</div>

		<div class="goods_con clearfix">
			<div class="goods_banner fl"><img src="{{ category.image }}"></div>
			<ul class="goods_list fl">
                {% for goods in goods_list %}
                    <li>
                        <h4>{{ goods.goods_name }}</h4>
                        <a href="/goods/detail/{{ goods.id }}/"><img src="{{ goods.pic }}"></a>
                        <div class="prize">¥ {{ goods.price }}</div>
                    </li>
                {% endfor %}
			</ul>
		</div>
	</div>
    {% endfor %}
{% endblock %}
